<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="keywords" content="w3school弹性导航栏">
    <title>w3school弹性导航栏</title>
    <!-- 引入reset样式 -->
    <link rel="stylesheet" href="/css/reset.css">
    <style>
        .menu {
            width: 1211px;
            height: 48px;
            line-height: 48px;
            background-color: #E8E7E3;
            margin: 100px auto;
            /* 设置为弹性容器 */
            display: flex;
        }

        .menu li {
            /* 设置弹性排列方式 */
            flex-direction: row;
            /* 设置伸展系数 */
            flex-grow: 1;
        }

        .menu a {
            display: block;
            text-align: center;
            color: #777777;
            font-size: 18px;
            font-family: Verdana, Arial, '微软雅黑', '宋体';
            text-decoration: none;
        } 

        .menu a:hover {
            background-color: rgb(63, 63, 63);
            color: rgb(226, 225, 221);
        }
    </style>
</head>

<body>
    <ul class="menu">
        <li class="nav"><a href="#">HTML/CSS</a></li>
        <li class="nav"><a href="#">Browser Side</a></li>
        <li class="nav"><a href="#">Server Side</a></li>
        <li class="nav"><a href="#">Programming</a></li>
        <li class="nav"><a href="#">XML</a></li>
        <li class="nav"><a href="#">Web Building</a></li>
        <li class="nav"><a href="#">Reference</a></li>
    </ul>
</body>

</html>